package jju.game;

import javax.swing.*;
import java.awt.*;
import java.util.Random;
import java.util.Vector;

public class Score extends JPanel{
    Vector<Point> point = new Vector<>();
    Score(){
        for (int i = 0; i < 80; ++i){
            point.add(new Point());
        }
    }
    @Override
    public void paint(Graphics g) {
        for (int i = 0; i < point.size(); ++i){
            g.setColor(new Color(246, 180, 192));
            // 填充圆的颜色
            g.fillOval(point.get(i).x, point.get(i).y, 5, 5);
        }

    }
}

class Point{
    Const value = new Const();
    Random randomX = new Random();
    Random randomY = new Random();
    public int x, y;
    Point(){
        x = randomX.nextInt(value.maxX - value.minX+1)+value.minX;
        y = randomY.nextInt(value.maxY - value.minY+1)+value.minY;
    }
}
